<template>
    <el-menu style="height: 100vh;" active-text-color="#ffd04b" background-color="#545c64" class="el-menu-vertical-demo"
        text-color="#fff" router>
        <template v-for="(v) in router.options.routes[1].children" :key="v.path">
            <el-menu-item :index="v.path">
                <el-icon>
                    <component :is="v.meta.icon"></component>
                </el-icon>
                <span>{{ v.meta.title }}</span>
            </el-menu-item>
        </template>
    </el-menu>
</template>

<script setup>
// import { onMounted } from "vue"
import { useRouter } from "vue-router"
let router = useRouter()
// onMounted(() => {
//     console.log("获取路由规则", router.options.routes[1].children)
// })
</script>

<style lang="scss" scoped>

</style>